package cn.tedu.hotel_management_system.pojo.entity;

import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * 
 * @TableName rooms
 */
@Data
@Accessors(chain = true)
public class Rooms implements Serializable {
    /**
     * 主键
     */
    private Long id;

    /**
     * 房间编号
     */
    private String roomNum;

    /**
     * 房间的状态(0空闲，1已入住，2打扫)
     */
    private String roomStatus;

    /**
     * 房间类型主键
     */
    private Long roomTypeId;

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    public Long getId() {
        return id;
    }

    /**
     * 主键
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 房间编号
     */
    public String getRoomNum() {
        return roomNum;
    }

    /**
     * 房间编号
     */
    public void setRoomNum(String roomNum) {
        this.roomNum = roomNum;
    }

    /**
     * 房间的状态(0空闲，1已入住，2打扫)
     */
    public String getRoomStatus() {
        return roomStatus;
    }

    /**
     * 房间的状态(0空闲，1已入住，2打扫)
     */
    public void setRoomStatus(String roomStatus) {
        this.roomStatus = roomStatus;
    }

    /**
     * 房间类型主键
     */
    public Long getRoomTypeId() {
        return roomTypeId;
    }

    /**
     * 房间类型主键
     */
    public void setRoomTypeId(Long roomTypeId) {
        this.roomTypeId = roomTypeId;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Rooms other = (Rooms) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getRoomNum() == null ? other.getRoomNum() == null : this.getRoomNum().equals(other.getRoomNum()))
            && (this.getRoomStatus() == null ? other.getRoomStatus() == null : this.getRoomStatus().equals(other.getRoomStatus()))
            && (this.getRoomTypeId() == null ? other.getRoomTypeId() == null : this.getRoomTypeId().equals(other.getRoomTypeId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getRoomNum() == null) ? 0 : getRoomNum().hashCode());
        result = prime * result + ((getRoomStatus() == null) ? 0 : getRoomStatus().hashCode());
        result = prime * result + ((getRoomTypeId() == null) ? 0 : getRoomTypeId().hashCode());
        return result;
    }

}